home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9726 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.urz.uni-heidelberg.de!cbb
  2. From: cbb@convex.phazc.uni-heidelberg.de (Christopher Blencowe)
  3. Newsgroups: comp.lang.c++
  4. Subject: Q: String replacement
  5. Date: 4 Mar 1996 09:20:01 GMT
  6. Organization: University of Heidelberg, Germany
  7. Message-ID: <4heck1$dqp@sun0.urz.uni-heidelberg.de>
  8. NNTP-Posting-Host: iris.phazc.uni-heidelberg.de
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. I hav a C program, with the following construct, to replace
  12. a character of a given string:
  13. The tsring is
  14. static char *line = "/dev/ptyXX";
  15.  
  16. The replacement should be
  17. line[8] = dp->d_name[3];
  18. line[9] = dp->d_name[4]:
  19.  
  20. so, replace XX with two other chars,
  21.  
  22. My cc (Convex OS 10.1) does not handle this, so is there
  23. a string function to come along the same ?
  24.  
  25. I am no good C programmer, so please follow up or guide me
  26. to the right lib, if any.
  27.  
  28. Christopher
  29.  
  30. --
  31. ----------------------------------------------------------------------
  32. >            Christopher Blencowe         _______     <
  33. >>     ||    Pharmazeutisch-Chemisches Institut    | .._.. |   <<
  34. >>>    /  \          Universitaet Heidelberg        |_______|  <<<
  35. >>     /____\               GERMANY            /______/    <<
  36. >        cbb@convex.phazc.uni-heidelberg.de                 <
  37. ----------------------------------------------------------------------
  38.  
  39.